package com.example;

import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) throws RemoteException, AlreadyBoundException, MalformedURLException {
        LocateRegistry.createRegistry(7777);
        RMIService rmiService = new RMIServiceImpl();
        Remote fastJsonInjector = new FastJsonInjectorImpl();
        Naming.bind("rmi://127.0.0.1:7777/rmiService", rmiService);
        Naming.bind("rmi://127.0.0.1:7777/fastJsonInjector", fastJsonInjector);
        System.out.println("start rmi service success");
    }
}
